<!DOCTYPE html>
<!-- saved from url=(0308)https://open.weixin.qq.com/connect/qrconnect?appid=wx6b26b7c75e8f3e5a&redirect_uri=http%3A%2F%2Fwww.imooc.com%2Fpassport%2Fuser%2Ftpcallback%3Freferer%3Dhttps%3A%2F%2Fwww.imooc.com%26browser_key%3Dbec411e07828e95a048822e959c8ee46%26tp%3Dweixin%26bind%3D0&response_type=code&scope=snsapi_login#wechat_redirect -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script async="" src="/sell/weChatLogin/qrconnect"></script>
    <title>微信登录</title>

    <link rel="stylesheet" href="/sell/weChatLogin/impowerApp3696b4.css">
    <link href="https://res.wx.qq.com/connect/zh_CN/htmledition/images/favicon3696b4.ico" rel="Shortcut Icon">
    <script src="/sell/weChatLogin/jquery.min3696b4.js.下载"></script>
</head>
<body style="background-color: rgb(51, 51, 51); padding: 50px;">
<input type="hidden" id="clientNum" value="${clientNum!0}">
<div class="main impowerBox">
    <div class="loginPanel normalPanel">
        <div class="title">微信登录</div>
        <div class="waiting panelContent">
            <div class="wrp_code"><img class="qrcode lightBorder" src="${url!0}"></div>
            <div class="info">
                <div class="status status_browser js_status normal" id="wx_default_tip">
                    <p>请使用微信扫描二维码登录</p>
                    <p>"墨染流云"</p>
                </div>
                <div class="status status_succ js_status normal" style="display:none" id="wx_after_scan">
                    <i class="status_icon icon38_msg succ"></i>
                    <div class="status_txt">
                        <h4>扫描成功</h4>
                        <p>请在微信中点击确认即可登录</p>
                    </div>
                </div>
                <div class="status status_fail js_status normal" style="display:none" id="wx_after_cancel">
                    <i class="status_icon icon38_msg warn"></i>
                    <div class="status_txt">
                        <h4>您已取消此次登录</h4>
                        <p>您可再次扫描登录，或关闭窗口</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var webscoket=null;
    if('WebSocket' in window){
        webscoket=new WebSocket('ws://zzyrestful.natapp1.cc/sell/webSocket');
    }else {
        alert("该浏览器不支持websocket");
    }
    webscoket.onopen=function (event) {
        console.log("建立连接")
    }
    webscoket.onclose=function (event) {
        console.log("关闭连接")
    }
    webscoket.onmessage=function (event) {
        console.log("收到消息"+event.data);
        window.location.href="http://zzyrestful.natapp1.cc/sell/fake/weChat/login/verify?clientNum="+event.data;
    }
    webscoket.onerror=function (event) {
        alert("通信发生错误");
    }
    window.onbeforeunload=function () {
        webscoket.close();
    }

</script>

</body></html>
